<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddBalanceOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('el_balance_order', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->string('order_no'); //订单编号
            $table->string('pay_type')->nullable();    //支付方式 包含支付宝，微信，余额支付
            $table->integer('pay_status')->unsigned()->default(0);
            $table->timestamp('pay_time')->nullable();
            $table->integer('amount');     //到账金额
            $table->integer('pay_amount'); //实际支付金额
            $table->string('note')->nullable();     //管理员备注
            $table->nullableTimestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('el_balance_order');
    }
}
